package model.aop.demo.aspect;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
@Aspect
@Order(2)
public class LogAspect {

    @Pointcut("@annotation(model.aop.demo.annoation.Log)")
    public void pointcut() {
    }

    //重要的属性  value   切入点表达式  获取切点方法
    @Before(value = "pointcut()")
    public void before() {
        System.out.println("LogAspect.核心方法执行之前执行的操作");
    }



}
